<!--
 * @Author: hq
 * @Date: 2022-05-18 19:57:54
 * @LastEditors: hq
 * @LastEditTime: 2022-05-23 19:05:32
 * @Description: 商品列表
 * @version: 1.0
-->
<template>
  <div class="info">
    <div class="card_con">
      <div class="row mb20">
        <div class="l" @click="handleAdd">
          <i class="el-icon-circle-close"></i>删除
        </div>
        <div class="l" @click="handleAdd">
          <i class="el-icon-delete"></i>情况
        </div>
      </div>
      <el-table
        border
        :data="tableData"
        class="midle_tb"
        :header-cell-style="{
          'text-align': 'center',
        }"
        :cell-style="{ 'text-align': 'center' }"
        stripe
        style="width: 100%"
        highlight-current-row
      >
        <el-table-column type="selection" min-width="5%"> </el-table-column>
        <el-table-column prop="id" label="id" min-width="5%"> </el-table-column>
        <el-table-column prop="tel" label="商品名" min-width="20%">
        </el-table-column>
        <el-table-column prop="location" label="简介" min-width="20%">
        </el-table-column>
        <el-table-column prop="location" label="分类" min-width="20%">
        </el-table-column>
        <el-table-column label="logo" min-width="15%">
          <template slot-scope="scope">
            <div class="slt">
              <el-popover placement="right" width="200" trigger="hover">
                <img class="tbImg1" :src="scope.row.logo" alt="" />
                <img
                  class="tbImg"
                  slot="reference"
                  :src="scope.row.logo"
                  alt=""
                />
              </el-popover>
            </div>
          </template>
        </el-table-column>
        <el-table-column prop="leixing" label="类型" min-width="10%">
        </el-table-column>
        <el-table-column prop="status" label="起始价" min-width="10%">
        </el-table-column>
        <el-table-column prop="status" label="销量" min-width="10%">
        </el-table-column>
        <el-table-column prop="status" label="状态" min-width="10%">
        </el-table-column>
        <el-table-column prop="create_time" label="创建时间" min-width="20%">
        </el-table-column>
        <el-table-column label="操作" min-width="20%">
          <template slot-scope="scope">
            <div
              class="handleEdit hand_cs"
              @click="handleEdit(scope.$index, scope.row)"
            >
              修改
            </div>
            <!-- <el-button
              size="mini"
              type="success"
              @click="handlePicture(scope.$index, scope.row)"
              >门头照</el-button
            > -->
          </template>
        </el-table-column>
      </el-table>
      <div class="pagination">
        <Pagination
          :page="page"
          @onCurrentChange="handleCurrentChange"
          @onSizeChange="handleSizeChange"
        />
      </div>
    </div>
  </div>
</template>

<script>
import Pagination from "@/components/Pagination.vue";
export default {
  components: { Pagination },
  data() {
    return {
      shopName: "",
      time: "",
      tableData: [
        {
          id: "23",
          hf_id: "123243",
          tel: "18582669937",
          location: "成都市武侯区",
          logo: require("@/assets/1.png"),
          leixing: "入驻",
          status: "启用",
          create_time: "2022-5-19",
        },
        {
          id: "23",
          hf_id: "123243",
          tel: "18582669937",
          location: "成都市武侯区",
          logo: require("@/assets/1.png"),
          leixing: "入驻",
          status: "启用",
          create_time: "2022-5-19",
        },
        {
          id: "23",
          hf_id: "123243",
          tel: "18582669937",
          location: "成都市武侯区",
          logo: require("@/assets/1.png"),
          leixing: "入驻",
          status: "启用",
          create_time: "2022-5-19",
        },
        {
          id: "23",
          hf_id: "123243",
          tel: "18582669937",
          location: "成都市武侯区",
          logo: require("@/assets/1.png"),
          leixing: "入驻",
          status: "启用",
          create_time: "2022-5-19",
        },
        {
          id: "23",
          hf_id: "123243",
          tel: "18582669937",
          location: "成都市武侯区",
          logo: require("@/assets/1.png"),
          leixing: "入驻",
          status: "启用",
          create_time: "2022-5-19",
        },
        {
          id: "23",
          hf_id: "123243",
          tel: "18582669937",
          location: "成都市武侯区",
          logo: require("@/assets/1.png"),
          leixing: "入驻",
          status: "启用",
          create_time: "2022-5-19",
        },
      ],
      page: {
        total: 0,
        pageNum: 1, // 当前页数
        pageSize: 10, // 每页的条数
      },
    };
  },
  methods: {
    //新增
    handleAdd() {},
    handleEdit() {
      this.$router.push("/goods/goods_edit");
    },
    // 每页 ${val} 条
    handleSizeChange(val) {
      //   this.$emit("onSizeChange", val);
    },
    // 当前页: ${val}
    handleCurrentChange(val) {
      //   this.$emit("onCurrentChange", val);
    },
  },
};
</script>

<style lang="scss" scoped>
.row {
  display: flex;
  border-radius: 2px;
  border: 1px solid #ccc;
  width: 80px;
  .l {
    width: 80px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;

    i {
      margin-right: 6px;
      font-size: 18px;
    }
    &:hover {
      cursor: pointer;
    }
  }
  .l:nth-child(3) {
    border-right: 0;
  }
}

.info {
  .title {
    font-size: 16px;
    margin-bottom: 13px;
  }
  .tab {
    background-color: #fff;
    padding: 20px;
    box-sizing: border-box;
  }
}
.tab {
  background-color: #fff;
  padding: 20px;
  box-sizing: border-box;
  .el-input {
    width: 20%;
    margin-right: 20px;
  }
  .el-button {
    margin-left: 20px;
  }
}

/deep/.el-breadcrumb__inner {
  cursor: pointer !important;
}
.marl {
  padding-left: 2px;
}
.midle_tb {
  margin-top: 20px;
}
/deep/.el-date-editor {
  width: 100%;
}
</style>
